import '@/styles/index.scss'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import App from './App.vue'
import router from './router'
// import * as ElementPlusIconsVue from '@element-plus/icons-vue';
// //注册全部 icon图标
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//   app.component(key, component);
// }

// import { dayjs } from 'element-plus'
// import 'dayjs/locale/zh-cn' // 引入中文包
// dayjs.locale('zh-cn') // 设置中文
// console.log('main',dayjs().format('YYYY MM DD'));

import TitleText from '@/components/TitleText/index.vue';
import Empty from '@/components/Empty/index.vue';
import Dialog from '@/components/Dialog/index.vue';
import FoldCard from '@/components/FoldCard/index.vue';
import CanvasImage from '@/components/CanvasImage/index.vue';

const app = createApp(App)

app.component('TitleText', TitleText);
app.component('Empty', Empty);
app.component('Dialog', Dialog);
app.component('FoldCard', FoldCard);
app.component('CanvasImage', CanvasImage);

app.use(ElementPlus, { locale: zhCn })
app.use(createPinia())
app.use(router)
app.mount('#app')
